package cn.pzhu.java.ch05;

public class StringConstant {
	public static void main(String[] args) {
		String s1="123";
		String s2="123";		
		String s3=new String("123");
		String s4="12"+"3";
		System.out.println(s1.equals(s2));
		System.out.println(s1.equals(s3));
		System.out.println(s1==s2);
		System.out.println(s1==s3);
		System.out.println(s1==s4);
		System.out.println(s1==s3.intern());
		
		String s5=s2;
		//s2.concat("123");
		System.out.println(s5==s2);
	}

}
